Show icon instead of exploding for a remote API file we don't have a local handler...
authorBrion Vibber <brion@users.mediawiki.org>
Tue, 23 Dec 2008 17:35:05 +0000 (17:35 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Tue, 23 Dec 2008 17:35:05 +0000 (17:35 +0000)
includes/filerepo/ForeignAPIFile.php

index fa692b1..d9fb85d 100644 (file)
@@ -35,6 +35,10 @@ class ForeignAPIFile extends File {
        }
 
        function transform( $params, $flags = 0 ) {
+               if( !$this->canRender() ) {
+                       // show icon
+                       return parent::transform( $params, $flags );
+               }
                $thumbUrl = $this->repo->getThumbUrlFromCache(
                                $this->getName(),
                                isset( $params['width'] ) ? $params['width'] : -1,